<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>打印二维码</title>
  <script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
  <style type="text/css">
    .gig-div{
      height: 560px;
      width: 860px;
      margin: auto;
      background-color: #ededee;
    }
    .margin{
      width: 96%;
      height: 100%;
      margin: auto;
    }
    .title-div{
      height: 10%;
      width: 100%;
      text-align: center;
      line-height: 94px;
    }
    .top-div{
      height: 2%;
      width: 100%;
    }
    .top-div-left{
      float: left;
      width: 35%;
      height: 20%;
      text-align: left;
      line-height: 47.5px;
      margin-left: 15px;
      font-weight: 600;
    }
    .top-div-right{
      float: right;
      width: 45%;
      height: 20%;
      text-align: right;
      line-height: 47.5px;
      margin-right: 15px;
      font-weight: 600;
    }
    .bable-div{
      height: 80%;
      width: 100%;
      text-align: center;;
    }
    table{
      border-collapse: collapse;
      text-align: center;
      width: 100%;
      height: 100%;
    }
    table td, table th{
      border: 1.5px solid #666;
      color: #666;
    }
    .bottom-div-left{
      width: 47%;
      height: 40px;
      float: left;
      text-align: left;
      line-height: 40px;
      margin-left: 15px;
    }
    .bottom-div-right{
      width: 40%;
      height: 40px;
      float: right;
      text-align: right;
      line-height: 40px;
      margin-right: 15px;
    }
    .button-div{
      height: 50px;
      width: 650px;
      margin: auto;
      text-align: center;
      line-height: 50px;
    }
    .button-submit{
      display: inline-block;
      height: 38px;
      line-height: 38px;
      padding: 0 18px;
      background-color: #009688;
      color: #fff;
      white-space: nowrap;
      text-align: center;
      font-size: 14px;
      border: none;
      border-radius: 2px;
      cursor: pointer;
    }
    .return{
      border: 1.5px solid #bdbdbd;
      background-color: #fff;
      border-color: #e6e6e6;
      color: #666;
    }
    input{
      border: none;
      background-color: #ededee;
      color: #666;
      font-size: 15px;
    }
    .number-input{
      width: 80px;
      height: 15px;
    }
    .nodes{
      height: 25px;
      width: 400px;
    }
    #img{
      margin-top: 50px;
    }
  </style>
</head>
<body>
<div class="button-div">
  <button class="button-submit" type="button" onclick="printing()">&emsp;打印&emsp;</button>
  <button class="button-submit return" type="button" onclick="backupPage()">&emsp;关闭&emsp;</button>
</div>
<div class="gig-div" id="printinghtml">
  <div class="margin">
    <div class="title-div"><h1 id="name">门店退货登记</h1></div>
    <div class="top-div">
    </div>
    <div class="bable-div">
      <img id="img">
    </div>
  </div>
</div>
</body>
<script type="text/javascript">

  $("img").attr("src","/hxStoreReturnsRegister/getqrcode");
  //返回按钮
  function backupPage(){
    var Index = parent.layer.getFrameIndex(window.name);
    parent.layer.close(Index);
  }

  //打印按钮
  function printing(){
    bdhtml = window.document.body.innerHTML;
    phtnl = window.document.getElementById("printinghtml").innerHTML;
    window.document.body.innerHTML = phtnl; //把需要打印的指定内容赋给big
    window.print(); //调用浏览器的打印功能打印指定区域
    window.document.body.innerHTML=bdhtml; // 最后还原页面
  }
</script>
</html>
